var path = require('path');

var baseFiles = [
    "base.js",
    "baseModel.js",
    "creation_tool.js",
    "ToolEntry.js",
    "PaletteViewer.js",
    "Designer.js",
    "attrs/TextModel.js",
    "attrs/ListbasedataModel.js",
    "attrs/IntModel.js",
    "attrs/FloatModel.js",
    "attrs/DatetimeModel.js",
];
baseFiles.prefix = '';

function generate(array) {
    var result = [];
    array.forEach(function(files) {
        var r = [];
        if (files.prefix) {
            files.forEach(function(file) {
                r.push(path.join(files.prefix, file));
            });
        } else {
            r = files;
        }
        result = result.concat(r);
    });
    return result;
}

// var transformed_baseFiles = baseFiles.map(function(item){
//   return path.join('base', item);
// });
// var transformed_drawd2dFiles = drawd2dFiles.map(function(item){
//   return path.join('draw2d', item);
// });
//
// var transformed_gefFiles = gefFiles.map(function(item){
//   return path.join('gef2', item);
// });


exports.files = generate([baseFiles]);
// transformed_baseFiles.concat(transformed_drawd2dFiles).concat(transformed_gefFiles);